package com.yanqu.road.server.cmd.activity.climbtower;

import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.pb.activity.ClimbTowerProto;
import com.yanqu.road.server.cmd.CrossCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.manager.activity.climbtower.CrossClimbTowerMgr;
import com.yanqu.road.server.protocol.Protocol;

@Cmd(code = Protocol.C_CLIMB_TOWER_TOP_UPDATE_END_TIME, desc = "更新活动结束时间")
public class CrossClimbTowerTopUpdateEndTimeCmd extends CrossCommand {

    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        return true;
    }

    @Override
    public void execute(YanQuMessage packet) throws Exception {
        ClimbTowerProto.ClimbTowerCrossUpdateEndTimeReqMsg reqMsg = ClimbTowerProto.ClimbTowerCrossUpdateEndTimeReqMsg.parseFrom(packet.getBytes());
        CrossClimbTowerMgr.updateActivityEndTime(reqMsg.getActivityId(), reqMsg.getEndShowTime());
    }

    @Override
    public void sendData() {
    }
}
